<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@ page isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>

<%@ page import="artaza.persistencia.*"%>
<%@ page import="java.util.List"%>
<%@ page import="clasesdao.*"%>
<%@ page import="java.util.List"%>



<html>
    <head>
        <link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" />
        <script type="text/javascript" src="JQuery/js/prototype.js"></script>
        <script language="javascript" src="JQuery/js/jquery-1.3.min.js"></script>
        <script type="text/javascript" src="JQuery/js/scriptaculous.js?load=effects,builder"></script>
        <script type="text/javascript" src="JQuery/js/lightbox.js"></script>
        <script type="text/javascript"  language="Javascript">
            function error(){
            <c:if test="${error_log}">
                    alert("Usuario o contraseña incorrecto.");
            </c:if>
                }
        </script>

    </head>
    <h1>
        <form action="/portada.html" method="post">
            <input type="image" src="/stylesheets/fondo_pagina.png">
        </form>

    </h1>
    <body onload="error();" style="background-image:url('/stylesheets/fondofincas.jpg');">
        <font color="white" size="4">REGISTRO</font>

        <table>
            <tr>
                <td>
                    <form action="/nuevo_usuario" method="post">
                    <fieldset>
                        <font color="white"><legend>Nuevo usuario</legend></font>
                        <font color="white">Usuario:<input name="username" type="text" size="10"/></font>
                        <font color="white"> Contraseña:<input name="password" type="password" size="10"/></font>
                    </fieldset>
                    <fieldset>
                        <font color="white"><legend>Información del usuario</legend></font>
                        <font color="white">*Nombre: <input name="nombre" type="text"></font>
                        <font color="white">*Apellidos:<input type ="text" name="apellidos"> <br /></font>
                        <font color="white">Teléfono: <input type="text" name="telefono"> <br /></font>
                        <font color="white">*Correo Electrónico:<input type="text" name="correo"></font>
                        <font color="white">Dni: <input type="text" name="dni"></font>
                        <font color="white" size="2">(*Campos obligatorios)</font>
                        <center><input type="submit" value="enviar"></center>
                    </fieldset>

                    </form>
                </td>
                <td>
                    <fieldset>
                        <font color="white"><legend>¿Ya estás registrado?</legend></font>
                        <form action="/login" method="get">
                            <font color="white">Usuario:<input name="username" type="text" size="10"/></font>
                            <font color="white">Contraseña:<input name="password" type="password" size="10"/></font>
                            <center><input type="submit" value="Conectar" /></center>
                        </form>
                    </fieldset>
                </td>
            </tr>
        </table>
    </body>
</html>
